/*
 * @Description:
 * @Author: 张民鸿
 * @Date: 2021-10-12 15:52:58
 * @FilePath: /cloud-register-business/Users/zhang/Desktop/zhang/Cloud-Registration-Desk/src/apis/login.ts
 * @LastEditTime: 2021-10-22 11:15:50
 * @LastEditors: MelodyJerry
 */
import AxiosRequest from "~utils/request";
const post = new AxiosRequest().post;

/**
 * @exports 验证码
 * @param mobile string 手机号
 * @returns Promise
 */
export const getCodeUrl = (mobile: string) => {
    return post("/sys/user/sendCode", { mobile });
}
/**
 * @exports 退出
 * @param params 
 * @returns Promise
 */
export const getlogout = () => {
    return post("/sys/user/logout");
}
/**
 * @exports 账号密码登录
 * @param params 
 * @returns Promise
 */
export const getLoginInfo = (params: any) => {
    return post("/sys/user/account-login", params);
}
/**
 * @exports 短信验证码登录
 * @param params 
 * @returns Promise
 */
export const getverifyCodeLoginInfo = (params: any) => {
    return post("/sys/user/verifyCode-login", params);
}
/**
 * @exports 修改密码
 * @param params 
 * @returns Promise
 */
export const updatePassword = (params: any) => {
    return post("/sys/user/upt-pwd", params);
}
/**
 * @exports 获取权限
 * @param params 
 * @returns Promise
 */
export const getPermissions = () => {
    return post<{ list: [] }>("/sys/user/userSourceList");
}
/**
 * @exports 刷新token接口
 * @param params 
 * @returns Promise
 */
export const refreshToken = (params: any) => {
    return post("/sys/user/refreshToken", params);
}
